<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:64:"D:\www\fdc\public/../application/manage\view\house_type\add.html";i:1490432758;s:63:"D:\www\fdc\public/../application/manage\view\public\header.html";i:1490355172;s:63:"D:\www\fdc\public/../application/manage\view\public\footer.html";i:1474280020;}*/ ?>
<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="__CSS__/style.css" rel="stylesheet"/>
	<title>管理中心</title>

</head>

<body>
<div id="J_ajax_loading" class="ajax_loading">加载中...</div>

<div class="subnav">
    <div class="content_menu ib_a blue line_x">
        <?php if(!empty($sub_menu) OR !empty($big_menu)): if(!(empty($big_menu) || (($big_menu instanceof \think\Collection || $big_menu instanceof \think\Paginator ) && $big_menu->isEmpty()))): if(isset($normal)): ?>
        <a class="add fb" href="<?php echo $big_menu['iframe']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php else: ?>
    	<a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo $big_menu['iframe']; ?>" data-title="<?php echo $big_menu['title']; ?>" data-id="<?php echo $big_menu['id']; ?>" data-width="<?php echo $big_menu['width']; ?>" data-height="<?php echo $big_menu['height']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php endif; endif; if(!(empty($sub_menu) || (($sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator ) && $sub_menu->isEmpty()))): if(is_array($sub_menu) || $sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key;if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo $val['url']; ?>" class="<?php echo $val['class']; ?>"><em><?php echo $val['name']; ?></em></a>
        <?php endforeach; endif; else: echo "" ;endif; endif; endif; ?>
    </div>
</div>

<style type="text/css">
    .house_type li{
        float: left;
    }
</style>
<!--添加户型-->
<form id="info_form" action="<?php echo url('addDo'); ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="house_id" id="house_id" value="<?php echo $house_id; ?>" />
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">基本信息</li>
            <li><a href="<?php echo url('House/index',['menuid'=>458]); ?>">返回楼盘列表</a></li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">所属楼盘 :</th>
                        <td>
                            <span id="housename"><?php echo $house_title; ?></span>
                        </td>
                    </tr>

		            <tr>
						<th>户型名称 :</th>
						<td>
							<input type="text" name="title" id="J_title" class="input-text" size="40">
                        </td>
					</tr>
                    <tr>
                        <th>户型 :</th>
                        <td>
                            <input type="text" name="room" id="room" class="input-text" size="5"/><span>室</span>
                            <input type="text" name="ting" id="ting" class="input-text" size="5"/><span>厅</span>
                            <input type="text" name="wei" id="wei" class="input-text" size="5"/><span>卫</span>
                            <input type="text" name="chu" id="chu" class="input-text" size="5"/><span>厨</span>
                            <input type="text" name="yang" id="yang" class="input-text" size="5"/><span>阳台</span>
                        </td>
                    </tr>
                    <tr>
                        <th>面积 :</th>
                        <td>
                            建筑面积 :<input type="text" name="jianzhu_area" id="jianzhu_area" class="input-text" size="5"/><span>平米</span>
                            套内面积 :<input type="text" name="taonei_area" id="taonei_area" class="input-text" size="5"/><span>平米</span>
                            公摊面积 :<input type="text" name="gongtan_area" id="gongtan_area" class="input-text" size="5"/><span>平米</span>
                        </td>
                    </tr>
                    <tr>
                       <th>价格 :</th>
                        <td>
                            总价 :<input type="text" name="price" id="price" class="input-text" size="5"/><span>万元</span>
                            朝向 :
                            <?php echo getLinkMenu(12,'chaoxiang','select','','name'); ?>
                        </td>
                    </tr>
                    <tr>
                        <th>销售状态 :</th>
                        <td>
                            <?php echo getLinkMenu(11,'sale_status','select','','name'); ?>
                        </td>
                    </tr>

                    <tr>
                        <th>户型特色 :</th>
                        <td><textarea name="special" id="special" style="width:500px;height:50px;resize: none;"></textarea></td>
                    </tr>
                    <tr>
                        <th>户型解析 :</th>
                        <td><textarea name="jiexi" id="jiexi" style="width:500px;height:50px;resize: none;"></textarea></td>
                    </tr>

                    <tr>
                        <th>户型图片 :</th>
                        <td><script id="uploadpic" name="uploadpic" type="text/plain"></script>
                           <input type="button" class="btn btn_submit" style="margin:0 0 10px 10px;" onclick="upImage();" value="选择图片">
                            <div id="imageList">
                                <ul class="list clearfix">
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th>主力户型  :</th>
                        <td>
                            <label><input type="radio" name="is_rec" class="radio_style" value="1" checked="checked"> 是 </label>&nbsp;&nbsp;
                            <label><input type="radio" name="is_rec" class="radio_style" value="0" >否</label>
                        </td>
                    </tr>
					<tr>
						<th>状态 :</th>
		 				<td>
		                	<label><input type="radio" name="status" class="radio_style" value="1" checked="checked"> 启用 </label>&nbsp;&nbsp;
							<label><input type="radio" name="status" class="radio_style" value="0" > 禁用 </label>
						</td>
					</tr>
				</table>
			</div>

            </div>
		<div class="mt10"><input type="submit" value="提交" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
</form>
<script src="__PUBLIC__/js/jquery.min.1.7.2.js"></script>
<script src="__JS__/manage.js"></script>
<script src="__JS__/admin.js"></script>
<script>
//初始化弹窗
(function (d) {
    d['okValue'] = '确定';
    d['cancelValue'] = '取消';
    d['title'] = '标题';
})($.dialog.defaults);
</script>
<script src="__PUBLIC__/js/plugins/formvalidator.js"></script>
<?php if(isset($list_table)): ?>
<script src="__PUBLIC__/js/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script>
<?php endif; ?>
<script src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
<script src="__PUBLIC__/js/ueditor/ueditor.all.min.js"></script>
<script src="__PUBLIC__/js/ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="__PUBLIC__/js/ueditor/uploadImg.js"></script>
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__PUBLIC__/js/ueditor/';
    window.onload=function(){
        upmoreimg();
    }
</script>
<script type="text/javascript">
    var check_name_url = "<?php echo url('HouseType/ajaxCheckTitle'); ?>";
    $(function(){
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $("#J_title").formValidator({onshow:"请填写户型名称",onfocus:"请填写户型名称"}).inputValidator({min:1,onerror:"请填写户型名称"}).ajaxValidator({
            type : "get",
            url : check_name_url,
            datatype : "json",
            async:'false',
            success : function(result){
                if(result.status == 0){
                    return false;
                }else{
                    return true;
                }
            },
            buttons: $("#dosubmit"),
            onerror : "请填写户型名称",
            onwait : "正在验证"
        });
    });

   </script>
</body>
</html>